// Generated from E:/dev/jparser/src/main/java/me/caosh/jparser\Java.g4 by ANTLR 4.5.3
package me.caosh.jparser.parser;

import java.util.*;
import me.caosh.jparser.model.*;

import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.misc.*;
import org.antlr.v4.runtime.tree.*;
import java.util.List;
import java.util.Iterator;
import java.util.ArrayList;

@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
public class JavaParser extends Parser {
	static { RuntimeMetaData.checkVersion("4.5.3", RuntimeMetaData.VERSION); }

	protected static final DFA[] _decisionToDFA;
	protected static final PredictionContextCache _sharedContextCache =
		new PredictionContextCache();
	public static final int
		THROWS=1, CLASS=2, INTERFACE=3, MODIFIER=4, PACKAGE=5, IMPORT=6, DOC_BEGIN=7, 
		DOC_END=8, DOCUMENT=9, STAR=10, DOT=11, SEMI=12, AT=13, PAR_BEGIN=14, 
		PAR_END=15, ASSIGN=16, COMMA=17, BRACE_BEGIN=18, BRACE_END=19, LT=20, 
		GT=21, CONST=22, TRUE=23, FALSE=24, STRING=25, ID=26, INT=27, NEWLINE=28, 
		WS=29, LINE_COMMENT=30, COMMENT=31;
	public static final int
		RULE_java = 0, RULE_packageName = 1, RULE_packag = 2, RULE_imports = 3, 
		RULE_imprt = 4, RULE_clazz = 5, RULE_annotation = 6, RULE_annotationParam = 7, 
		RULE_member = 8, RULE_field = 9, RULE_method = 10, RULE_type = 11, RULE_parameter = 12, 
		RULE_document = 13, RULE_methodDocument = 14;
	public static final String[] ruleNames = {
		"java", "packageName", "packag", "imports", "imprt", "clazz", "annotation", 
		"annotationParam", "member", "field", "method", "type", "parameter", "document", 
		"methodDocument"
	};

	private static final String[] _LITERAL_NAMES = {
		null, "'throws'", "'class'", "'interface'", null, "'package'", "'import'", 
		"'/**'", "'*/'", null, "'*'", "'.'", "';'", "'@'", "'('", "')'", "'='", 
		"','", "'{'", "'}'", "'<'", "'>'", null, "'true'", "'false'"
	};
	private static final String[] _SYMBOLIC_NAMES = {
		null, "THROWS", "CLASS", "INTERFACE", "MODIFIER", "PACKAGE", "IMPORT", 
		"DOC_BEGIN", "DOC_END", "DOCUMENT", "STAR", "DOT", "SEMI", "AT", "PAR_BEGIN", 
		"PAR_END", "ASSIGN", "COMMA", "BRACE_BEGIN", "BRACE_END", "LT", "GT", 
		"CONST", "TRUE", "FALSE", "STRING", "ID", "INT", "NEWLINE", "WS", "LINE_COMMENT", 
		"COMMENT"
	};
	public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);

	/**
	 * @deprecated Use {@link #VOCABULARY} instead.
	 */
	@Deprecated
	public static final String[] tokenNames;
	static {
		tokenNames = new String[_SYMBOLIC_NAMES.length];
		for (int i = 0; i < tokenNames.length; i++) {
			tokenNames[i] = VOCABULARY.getLiteralName(i);
			if (tokenNames[i] == null) {
				tokenNames[i] = VOCABULARY.getSymbolicName(i);
			}

			if (tokenNames[i] == null) {
				tokenNames[i] = "<INVALID>";
			}
		}
	}

	@Override
	@Deprecated
	public String[] getTokenNames() {
		return tokenNames;
	}

	@Override

	public Vocabulary getVocabulary() {
		return VOCABULARY;
	}

	@Override
	public String getGrammarFileName() { return "Java.g4"; }

	@Override
	public String[] getRuleNames() { return ruleNames; }

	@Override
	public String getSerializedATN() { return _serializedATN; }

	@Override
	public ATN getATN() { return _ATN; }


	    private String packageDef;
	    private List<String> imports = new ArrayList<>();
	    private Interface intface = new Interface();
	    private List<Method> methods = new ArrayList<>();

	    public Interface getInterface() { return intface; }
	    public List<Method> getMethods() { return methods; }
	    public void setPackageDef(String  packageDef) { this.packageDef = packageDef; }
	    public String getPackageDef() { return packageDef; }
	    public void addImport(String  imp) { this.imports.add(imp); }
	    public List<String> getImports() { return imports; }

	public JavaParser(TokenStream input) {
		super(input);
		_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
	}
	public static class JavaContext extends ParserRuleContext {
		public PackagContext packag() {
			return getRuleContext(PackagContext.class,0);
		}
		public ImportsContext imports() {
			return getRuleContext(ImportsContext.class,0);
		}
		public ClazzContext clazz() {
			return getRuleContext(ClazzContext.class,0);
		}
		public JavaContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_java; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).enterJava(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).exitJava(this);
		}
	}

	public final JavaContext java() throws RecognitionException {
		JavaContext _localctx = new JavaContext(_ctx, getState());
		enterRule(_localctx, 0, RULE_java);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(30);
			packag();
			setState(31);
			imports();
			setState(32);
			clazz();
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class PackageNameContext extends ParserRuleContext {
		public List<TerminalNode> ID() { return getTokens(JavaParser.ID); }
		public TerminalNode ID(int i) {
			return getToken(JavaParser.ID, i);
		}
		public List<TerminalNode> DOT() { return getTokens(JavaParser.DOT); }
		public TerminalNode DOT(int i) {
			return getToken(JavaParser.DOT, i);
		}
		public TerminalNode STAR() { return getToken(JavaParser.STAR, 0); }
		public PackageNameContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_packageName; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).enterPackageName(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).exitPackageName(this);
		}
	}

	public final PackageNameContext packageName() throws RecognitionException {
		PackageNameContext _localctx = new PackageNameContext(_ctx, getState());
		enterRule(_localctx, 2, RULE_packageName);
		int _la;
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			setState(34);
			match(ID);
			setState(39);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,0,_ctx);
			while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
				if ( _alt==1 ) {
					{
					{
					setState(35);
					match(DOT);
					setState(36);
					match(ID);
					}
					} 
				}
				setState(41);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,0,_ctx);
			}
			setState(44);
			_la = _input.LA(1);
			if (_la==DOT) {
				{
				setState(42);
				match(DOT);
				setState(43);
				match(STAR);
				}
			}

			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class PackagContext extends ParserRuleContext {
		public PackageNameContext pkg;
		public TerminalNode PACKAGE() { return getToken(JavaParser.PACKAGE, 0); }
		public TerminalNode SEMI() { return getToken(JavaParser.SEMI, 0); }
		public PackageNameContext packageName() {
			return getRuleContext(PackageNameContext.class,0);
		}
		public PackagContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_packag; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).enterPackag(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).exitPackag(this);
		}
	}

	public final PackagContext packag() throws RecognitionException {
		PackagContext _localctx = new PackagContext(_ctx, getState());
		enterRule(_localctx, 4, RULE_packag);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(46);
			match(PACKAGE);
			setState(47);
			((PackagContext)_localctx).pkg = packageName();
			setState(48);
			match(SEMI);
			 setPackageDef((((PackagContext)_localctx).pkg!=null?_input.getText(((PackagContext)_localctx).pkg.start,((PackagContext)_localctx).pkg.stop):null)); 
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ImportsContext extends ParserRuleContext {
		public List<ImprtContext> imprt() {
			return getRuleContexts(ImprtContext.class);
		}
		public ImprtContext imprt(int i) {
			return getRuleContext(ImprtContext.class,i);
		}
		public ImportsContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_imports; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).enterImports(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).exitImports(this);
		}
	}

	public final ImportsContext imports() throws RecognitionException {
		ImportsContext _localctx = new ImportsContext(_ctx, getState());
		enterRule(_localctx, 6, RULE_imports);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(54);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==IMPORT) {
				{
				{
				setState(51);
				imprt();
				}
				}
				setState(56);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ImprtContext extends ParserRuleContext {
		public PackageNameContext pkg;
		public TerminalNode IMPORT() { return getToken(JavaParser.IMPORT, 0); }
		public TerminalNode SEMI() { return getToken(JavaParser.SEMI, 0); }
		public PackageNameContext packageName() {
			return getRuleContext(PackageNameContext.class,0);
		}
		public ImprtContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_imprt; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).enterImprt(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).exitImprt(this);
		}
	}

	public final ImprtContext imprt() throws RecognitionException {
		ImprtContext _localctx = new ImprtContext(_ctx, getState());
		enterRule(_localctx, 8, RULE_imprt);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(57);
			match(IMPORT);
			setState(58);
			((ImprtContext)_localctx).pkg = packageName();
			setState(59);
			match(SEMI);
			 addImport((((ImprtContext)_localctx).pkg!=null?_input.getText(((ImprtContext)_localctx).pkg.start,((ImprtContext)_localctx).pkg.stop):null)); 
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ClazzContext extends ParserRuleContext {
		public Token nam;
		public TerminalNode INTERFACE() { return getToken(JavaParser.INTERFACE, 0); }
		public TerminalNode BRACE_BEGIN() { return getToken(JavaParser.BRACE_BEGIN, 0); }
		public TerminalNode BRACE_END() { return getToken(JavaParser.BRACE_END, 0); }
		public TerminalNode ID() { return getToken(JavaParser.ID, 0); }
		public DocumentContext document() {
			return getRuleContext(DocumentContext.class,0);
		}
		public AnnotationContext annotation() {
			return getRuleContext(AnnotationContext.class,0);
		}
		public TerminalNode MODIFIER() { return getToken(JavaParser.MODIFIER, 0); }
		public List<MemberContext> member() {
			return getRuleContexts(MemberContext.class);
		}
		public MemberContext member(int i) {
			return getRuleContext(MemberContext.class,i);
		}
		public ClazzContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_clazz; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).enterClazz(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).exitClazz(this);
		}
	}

	public final ClazzContext clazz() throws RecognitionException {
		ClazzContext _localctx = new ClazzContext(_ctx, getState());
		enterRule(_localctx, 10, RULE_clazz);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(63);
			_la = _input.LA(1);
			if (_la==DOCUMENT) {
				{
				setState(62);
				document();
				}
			}

			setState(66);
			_la = _input.LA(1);
			if (_la==AT) {
				{
				setState(65);
				annotation();
				}
			}

			setState(69);
			_la = _input.LA(1);
			if (_la==MODIFIER) {
				{
				setState(68);
				match(MODIFIER);
				}
			}

			setState(71);
			match(INTERFACE);
			setState(72);
			((ClazzContext)_localctx).nam = match(ID);
			 getInterface().setName((((ClazzContext)_localctx).nam!=null?((ClazzContext)_localctx).nam.getText():null)); 
			setState(74);
			match(BRACE_BEGIN);
			setState(78);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << MODIFIER) | (1L << DOCUMENT) | (1L << AT) | (1L << ID))) != 0)) {
				{
				{
				setState(75);
				member();
				}
				}
				setState(80);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			setState(81);
			match(BRACE_END);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class AnnotationContext extends ParserRuleContext {
		public TerminalNode AT() { return getToken(JavaParser.AT, 0); }
		public TerminalNode ID() { return getToken(JavaParser.ID, 0); }
		public TerminalNode PAR_BEGIN() { return getToken(JavaParser.PAR_BEGIN, 0); }
		public TerminalNode PAR_END() { return getToken(JavaParser.PAR_END, 0); }
		public List<AnnotationParamContext> annotationParam() {
			return getRuleContexts(AnnotationParamContext.class);
		}
		public AnnotationParamContext annotationParam(int i) {
			return getRuleContext(AnnotationParamContext.class,i);
		}
		public List<TerminalNode> COMMA() { return getTokens(JavaParser.COMMA); }
		public TerminalNode COMMA(int i) {
			return getToken(JavaParser.COMMA, i);
		}
		public AnnotationContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_annotation; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).enterAnnotation(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).exitAnnotation(this);
		}
	}

	public final AnnotationContext annotation() throws RecognitionException {
		AnnotationContext _localctx = new AnnotationContext(_ctx, getState());
		enterRule(_localctx, 12, RULE_annotation);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(83);
			match(AT);
			setState(84);
			match(ID);
			setState(97);
			_la = _input.LA(1);
			if (_la==PAR_BEGIN) {
				{
				setState(85);
				match(PAR_BEGIN);
				setState(94);
				_la = _input.LA(1);
				if (_la==ID) {
					{
					setState(86);
					annotationParam();
					setState(91);
					_errHandler.sync(this);
					_la = _input.LA(1);
					while (_la==COMMA) {
						{
						{
						setState(87);
						match(COMMA);
						setState(88);
						annotationParam();
						}
						}
						setState(93);
						_errHandler.sync(this);
						_la = _input.LA(1);
					}
					}
				}

				setState(96);
				match(PAR_END);
				}
			}

			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class AnnotationParamContext extends ParserRuleContext {
		public TerminalNode ID() { return getToken(JavaParser.ID, 0); }
		public TerminalNode ASSIGN() { return getToken(JavaParser.ASSIGN, 0); }
		public TerminalNode CONST() { return getToken(JavaParser.CONST, 0); }
		public AnnotationParamContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_annotationParam; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).enterAnnotationParam(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).exitAnnotationParam(this);
		}
	}

	public final AnnotationParamContext annotationParam() throws RecognitionException {
		AnnotationParamContext _localctx = new AnnotationParamContext(_ctx, getState());
		enterRule(_localctx, 14, RULE_annotationParam);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(99);
			match(ID);
			setState(100);
			match(ASSIGN);
			setState(101);
			match(CONST);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class MemberContext extends ParserRuleContext {
		public FieldContext field() {
			return getRuleContext(FieldContext.class,0);
		}
		public MethodContext method() {
			return getRuleContext(MethodContext.class,0);
		}
		public MemberContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_member; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).enterMember(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).exitMember(this);
		}
	}

	public final MemberContext member() throws RecognitionException {
		MemberContext _localctx = new MemberContext(_ctx, getState());
		enterRule(_localctx, 16, RULE_member);
		try {
			setState(105);
			_errHandler.sync(this);
			switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) {
			case 1:
				enterOuterAlt(_localctx, 1);
				{
				setState(103);
				field();
				}
				break;
			case 2:
				enterOuterAlt(_localctx, 2);
				{
				setState(104);
				method();
				}
				break;
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class FieldContext extends ParserRuleContext {
		public TypeContext type() {
			return getRuleContext(TypeContext.class,0);
		}
		public TerminalNode ID() { return getToken(JavaParser.ID, 0); }
		public TerminalNode SEMI() { return getToken(JavaParser.SEMI, 0); }
		public DocumentContext document() {
			return getRuleContext(DocumentContext.class,0);
		}
		public TerminalNode ASSIGN() { return getToken(JavaParser.ASSIGN, 0); }
		public TerminalNode CONST() { return getToken(JavaParser.CONST, 0); }
		public FieldContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_field; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).enterField(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).exitField(this);
		}
	}

	public final FieldContext field() throws RecognitionException {
		FieldContext _localctx = new FieldContext(_ctx, getState());
		enterRule(_localctx, 18, RULE_field);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(108);
			_la = _input.LA(1);
			if (_la==DOCUMENT) {
				{
				setState(107);
				document();
				}
			}

			setState(110);
			type();
			setState(111);
			match(ID);
			setState(114);
			_la = _input.LA(1);
			if (_la==ASSIGN) {
				{
				setState(112);
				match(ASSIGN);
				setState(113);
				match(CONST);
				}
			}

			setState(116);
			match(SEMI);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class MethodContext extends ParserRuleContext {
		public Method mtd =  new Method();;
		public TypeContext ret;
		public Token nam;
		public TerminalNode PAR_BEGIN() { return getToken(JavaParser.PAR_BEGIN, 0); }
		public TerminalNode PAR_END() { return getToken(JavaParser.PAR_END, 0); }
		public TerminalNode SEMI() { return getToken(JavaParser.SEMI, 0); }
		public TypeContext type() {
			return getRuleContext(TypeContext.class,0);
		}
		public List<TerminalNode> ID() { return getTokens(JavaParser.ID); }
		public TerminalNode ID(int i) {
			return getToken(JavaParser.ID, i);
		}
		public MethodDocumentContext methodDocument() {
			return getRuleContext(MethodDocumentContext.class,0);
		}
		public AnnotationContext annotation() {
			return getRuleContext(AnnotationContext.class,0);
		}
		public TerminalNode MODIFIER() { return getToken(JavaParser.MODIFIER, 0); }
		public List<ParameterContext> parameter() {
			return getRuleContexts(ParameterContext.class);
		}
		public ParameterContext parameter(int i) {
			return getRuleContext(ParameterContext.class,i);
		}
		public TerminalNode THROWS() { return getToken(JavaParser.THROWS, 0); }
		public List<TerminalNode> COMMA() { return getTokens(JavaParser.COMMA); }
		public TerminalNode COMMA(int i) {
			return getToken(JavaParser.COMMA, i);
		}
		public MethodContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_method; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).enterMethod(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).exitMethod(this);
		}
	}

	public final MethodContext method() throws RecognitionException {
		MethodContext _localctx = new MethodContext(_ctx, getState());
		enterRule(_localctx, 20, RULE_method);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(119);
			_la = _input.LA(1);
			if (_la==DOCUMENT) {
				{
				setState(118);
				methodDocument();
				}
			}

			setState(122);
			_la = _input.LA(1);
			if (_la==AT) {
				{
				setState(121);
				annotation();
				}
			}

			setState(125);
			_la = _input.LA(1);
			if (_la==MODIFIER) {
				{
				setState(124);
				match(MODIFIER);
				}
			}

			setState(127);
			((MethodContext)_localctx).ret = type();
			 ((MethodContext)getInvokingContext(10)).mtd.setReturns((((MethodContext)_localctx).ret!=null?_input.getText(((MethodContext)_localctx).ret.start,((MethodContext)_localctx).ret.stop):null)); 
			setState(129);
			((MethodContext)_localctx).nam = match(ID);
			 ((MethodContext)getInvokingContext(10)).mtd.setName((((MethodContext)_localctx).nam!=null?((MethodContext)_localctx).nam.getText():null)); 
			setState(131);
			match(PAR_BEGIN);
			setState(140);
			_la = _input.LA(1);
			if (_la==AT || _la==ID) {
				{
				setState(132);
				parameter();
				setState(137);
				_errHandler.sync(this);
				_la = _input.LA(1);
				while (_la==COMMA) {
					{
					{
					setState(133);
					match(COMMA);
					setState(134);
					parameter();
					}
					}
					setState(139);
					_errHandler.sync(this);
					_la = _input.LA(1);
				}
				}
			}

			setState(142);
			match(PAR_END);
			setState(145);
			_la = _input.LA(1);
			if (_la==THROWS) {
				{
				setState(143);
				match(THROWS);
				setState(144);
				match(ID);
				}
			}

			setState(147);
			match(SEMI);
			 methods.add(((MethodContext)getInvokingContext(10)).mtd); 
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class TypeContext extends ParserRuleContext {
		public TerminalNode ID() { return getToken(JavaParser.ID, 0); }
		public TerminalNode LT() { return getToken(JavaParser.LT, 0); }
		public TypeContext type() {
			return getRuleContext(TypeContext.class,0);
		}
		public TerminalNode GT() { return getToken(JavaParser.GT, 0); }
		public TypeContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_type; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).enterType(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).exitType(this);
		}
	}

	public final TypeContext type() throws RecognitionException {
		TypeContext _localctx = new TypeContext(_ctx, getState());
		enterRule(_localctx, 22, RULE_type);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(150);
			match(ID);
			setState(155);
			_la = _input.LA(1);
			if (_la==LT) {
				{
				setState(151);
				match(LT);
				setState(152);
				type();
				setState(153);
				match(GT);
				}
			}

			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ParameterContext extends ParserRuleContext {
		public TypeContext typ;
		public Token nam;
		public TypeContext type() {
			return getRuleContext(TypeContext.class,0);
		}
		public TerminalNode ID() { return getToken(JavaParser.ID, 0); }
		public AnnotationContext annotation() {
			return getRuleContext(AnnotationContext.class,0);
		}
		public ParameterContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_parameter; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).enterParameter(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).exitParameter(this);
		}
	}

	public final ParameterContext parameter() throws RecognitionException {
		ParameterContext _localctx = new ParameterContext(_ctx, getState());
		enterRule(_localctx, 24, RULE_parameter);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(158);
			_la = _input.LA(1);
			if (_la==AT) {
				{
				setState(157);
				annotation();
				}
			}

			setState(160);
			((ParameterContext)_localctx).typ = type();
			setState(161);
			((ParameterContext)_localctx).nam = match(ID);
			 ((MethodContext)getInvokingContext(10)).mtd.addParameter((((ParameterContext)_localctx).typ!=null?_input.getText(((ParameterContext)_localctx).typ.start,((ParameterContext)_localctx).typ.stop):null), (((ParameterContext)_localctx).nam!=null?((ParameterContext)_localctx).nam.getText():null)); 
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class DocumentContext extends ParserRuleContext {
		public Token doc;
		public TerminalNode DOCUMENT() { return getToken(JavaParser.DOCUMENT, 0); }
		public DocumentContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_document; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).enterDocument(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).exitDocument(this);
		}
	}

	public final DocumentContext document() throws RecognitionException {
		DocumentContext _localctx = new DocumentContext(_ctx, getState());
		enterRule(_localctx, 26, RULE_document);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(164);
			((DocumentContext)_localctx).doc = match(DOCUMENT);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class MethodDocumentContext extends ParserRuleContext {
		public Token doc;
		public TerminalNode DOCUMENT() { return getToken(JavaParser.DOCUMENT, 0); }
		public MethodDocumentContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_methodDocument; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).enterMethodDocument(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof JavaListener ) ((JavaListener)listener).exitMethodDocument(this);
		}
	}

	public final MethodDocumentContext methodDocument() throws RecognitionException {
		MethodDocumentContext _localctx = new MethodDocumentContext(_ctx, getState());
		enterRule(_localctx, 28, RULE_methodDocument);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(166);
			((MethodDocumentContext)_localctx).doc = match(DOCUMENT);
			 ((MethodContext)getInvokingContext(10)).mtd.setDocument((((MethodDocumentContext)_localctx).doc!=null?((MethodDocumentContext)_localctx).doc.getText():null)); 
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static final String _serializedATN =
		"\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3!\u00ac\4\2\t\2\4"+
		"\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t"+
		"\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\3\2\3\2\3\2\3\2\3\3"+
		"\3\3\3\3\7\3(\n\3\f\3\16\3+\13\3\3\3\3\3\5\3/\n\3\3\4\3\4\3\4\3\4\3\4"+
		"\3\5\7\5\67\n\5\f\5\16\5:\13\5\3\6\3\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2\u0082"+
		"\u0083\b\f\1\2\u0083\u0084\7\34\2\2\u0084\u0085\b\f\1\2\u0085\u008e\7"+
		"\20\2\2\u0086\u008b\5\32\16\2\u0087\u0088\7\23\2\2\u0088\u008a\5\32\16"+
		"\2\u0089\u0087\3\2\2\2\u008a\u008d\3\2\2\2\u008b\u0089\3\2\2\2\u008b\u008c"+
		"\3\2\2\2\u008c\u008f\3\2\2\2\u008d\u008b\3\2\2\2\u008e\u0086\3\2\2\2\u008e"+
		"\u008f\3\2\2\2\u008f\u0090\3\2\2\2\u0090\u0093\7\21\2\2\u0091\u0092\7"+
		"\3\2\2\u0092\u0094\7\34\2\2\u0093\u0091\3\2\2\2\u0093\u0094\3\2\2\2\u0094"+
		"\u0095\3\2\2\2\u0095\u0096\7\16\2\2\u0096\u0097\b\f\1\2\u0097\27\3\2\2"+
		"\2\u0098\u009d\7\34\2\2\u0099\u009a\7\26\2\2\u009a\u009b\5\30\r\2\u009b"+
		"\u009c\7\27\2\2\u009c\u009e\3\2\2\2\u009d\u0099\3\2\2\2\u009d\u009e\3"+
		"\2\2\2\u009e\31\3\2\2\2\u009f\u00a1\5\16\b\2\u00a0\u009f\3\2\2\2\u00a0"+
		"\u00a1\3\2\2\2\u00a1\u00a2\3\2\2\2\u00a2\u00a3\5\30\r\2\u00a3\u00a4\7"+
		"\34\2\2\u00a4\u00a5\b\16\1\2\u00a5\33\3\2\2\2\u00a6\u00a7\7\13\2\2\u00a7"+
		"\35\3\2\2\2\u00a8\u00a9\7\13\2\2\u00a9\u00aa\b\20\1\2\u00aa\37\3\2\2\2"+
		"\27).8ADGP]`cknty|\177\u008b\u008e\u0093\u009d\u00a0";
	public static final ATN _ATN =
		new ATNDeserializer().deserialize(_serializedATN.toCharArray());
	static {
		_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
		for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
			_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
		}
	}
}